<template>
  <div class="home-btn-container" @click="toComicList">
    <div class="btn">
      <img :src="message.thumb.fileServer + '/static/' + message.thumb.path" class="img-container">
      <div class="text-container">{{ message.title }}</div>
    </div>
  </div>
</template>

<script>
import router from "@/router";

export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "homeBtnPlus",
  data(){
    return {
      imgPath:''
    }
  },
  props: ["message"],
  setup(props){
    function toComicList() {
      router.push({ path: '/main/comics', query: { block: props.message.title }})
    }

    return {
      toComicList
    }
  }
}
</script>

<style scoped>
.home-btn-container {
  height: 140px;
  width: calc(33.3% - 10px);
  padding: 5px;
}

.btn {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  padding: 5px;
  background-color: white;
  border-radius: 5px;
}

.img-container {
  width: 100%;
  height: 80%;
  border-radius: 3px;
}

.text-container {
  width: 100%;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1929d;
}
</style>